Document Copilot CLI permissions-config.json schema and persisted approvals#44916
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
How to review these changes 👓Thank you for your contribution. To review these changes, choose one of the following options: A Hubber will need to deploy your changes internally to review. Table of review linksNote: Please update the URL for your staging server or codespace. The table shows the files in the
Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server 🤖 This comment is automatically generated. |
There was a problem hiding this comment.
Pull request overview
Expands the GitHub Copilot CLI documentation for permissions-config.json, covering where it’s stored, how location scoping works, and the approval schema so users can reliably migrate or author persisted tool/path approvals.
Changes:
- Added detailed reference documentation for
permissions-config.json(resolution order, location keying, schema, approval kinds, and examples). - Documented command identifier and directory matching behavior used by persisted approvals.
- Added a “persisted permissions” explanation and cross-links from the tool-permissions how-to.
Show a summary per file
| File | Description |
|---|---|
| content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md | Adds full reference coverage for permissions-config.json location resolution, schema, approval kinds, and examples. |
| content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md | Explains persisted approvals and links to the detailed reference section. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I see you've shared the README.md file from your fork of the Key points about this project:
Is there something specific you'd like to do with this repository? I can help you with:
What would you like to work on? |
There was a problem hiding this comment.
@danmoseley - This looks good. The docs file content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md is auto-updated by AI based on the docs in the dev repo so the lack of detail suggests this was missing from the internal docs. Thanks for adding.
I've made one correction, changing:
Saved URL rules are stored in
config.json, not inpermissions-config.json.
to:
Saved URL rules are stored in
settings.json, not inpermissions-config.json.
|
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Note
This pull request was created with the help of GitHub Copilot, and parts of the documentation were AI-generated. All schema details were verified against the Copilot CLI source.
What this changes
Expands the documentation for the Copilot CLI
permissions-config.jsonfile, which was previously documented only at a surface level.content/copilot/reference/copilot-cli-reference/cli-config-dir-reference.md--config-dir→COPILOT_HOME→~/.copilot/permissions-config.json) and the legacy extensionless file.locationskeying rules (Git root; linked worktrees resolve to the main repo root; submodules use their own directory; non-Git uses the cwd).locations,tool_approvals, andallowed_directories, and every approvalkind(commands,read,write,memory,mcp,mcp-sampling,custom-tool,extension-management,extension-permission-access) with their per-kind fields (commandIdentifiers,serverName,toolName,operation,extensionName).content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md~/.copilot/permissions-config.json, with a cross-link to the reference section.Why
Users have reported that
permissions-config.jsonis hard to configure because the schema, fields, and file location were not documented in enough detail — particularly when migrating settings from other agent CLIs.Verification
The documented schema, approval kinds, and per-kind fields were checked against the product source. Examples are valid JSON and consistent with the schema table. Locally ran
npm ciand the docs content linter (lint-content) on the changed files; the repo's pre-commit content lint also passed.